using System.Collections.Generic;
using SCore.Function.Fixed;
using UnityEngine;

namespace Function.SkillEditor.Runtime
{
    public enum SkillBuffType
    {
        Attack,
        Reply,
    }

    public class SkillBuffClip : SkillClip
    {
        public List<SkillTriggerClip> _triggers = new List<SkillTriggerClip>();
        public SkillBuffType _skillBuffType;
        public int _count;

        public List<int> GetTriggersFrame()
        {
            List<int> frames = new List<int>();
            if (_count == 1)
            {
                frames.Add(_startFrame);
            }
            else
            {
                float invFrame = (float)_lengthFrame / (_count - 1);
                for (int i = 0; i < _count; i++)
                {
                    int frame = Mathf.FloorToInt(invFrame * i);
                    frames.Add(frame + _startFrame);
                }
            }

            return frames;
        }
    }
}